{include file="header.html"}
<link href="//cdn.bootcss.com/Buttons/2.0.0/css/buttons.min.css" rel="stylesheet">
<style>
    .welcome_detaile .item .mt span {
        padding-top: 40px;
    }
</style>
<script src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/layer/2.3/layer.js"></script>
<div id="rightTop">
    <p>
        {$lang.hello}<b>{$admin.user_name}</b>{$lang.welcome_to_ecmall}
        {$lang.last_login} {$admin.last_login|date:complete} {$lang.last_ip} {$admin.last_ip}
    </p>
</div>
<dl id="rightCon">
    <div class="welcome_detaile">
        <div class="item goods_item">
            <div class="mt">
                <span>{$lang.goods_data}</span>
            </div>
            <div class="mc">
                <ul>
                    <li>
                        <strong><a href="{url app=goods}">{$lang.goods_sku_number}</a></strong>
                        <span>{$goods_sku_number} {$lang.individual}</span>
                    </li>
                    <li class="li_even">
                        <strong><a href="{url app=goods}">{$lang.goods_sku_sellnumber}</a></strong>
                        <span>{$goods_sku_sellnumber} {$lang.individual}</span>
                    </li>

                    <li>
                        <strong><a href="{url app=goods}">{$lang.goods_spu_number}</a></strong>
                        <span>{$goods_spu_number} {$lang.individual}</span>
                    </li>
                    <li class="li_even">
                        <strong><a href="{url app=goods}">{$lang.goods_cate_number}</a></strong>
                        <span>{$goods_cate_number} {$lang.individual}</span>
                    </li>

                    <li>
                        <strong><a href="{url app=goods}">{$lang.goods_secondcate_number}</a></strong>
                        <span>{$goods_secondcate_number} {$lang.individual}</span>
                    </li>
                    <li class="li_even">
                        <strong><a href="{url app=goods}">{$lang.goods_sum_price}</a></strong>
                        <span>{$goods_sum_price} {$lang.currency}</span>
                    </li>

                    <li>
                        <strong><a href="{url app=goods}">{$lang.goods_sum_number}</a></strong>
                        <span>{$goods_sum_number} {$lang.individual}</span>
                    </li>
                    <li class="li_even">
                        <strong><a href="{url app=goods}">{$lang.goods_branddata}</a></strong>
                        <span><a id="view" class="button button-primary button-rounded button-small"
                                 href="javascript:void(0);">查看</a></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</dl>
{include file="footer.html"}
<script>
    // 处理品牌点击
    // 获取收货地区统计信息
    function getbrandsandgoods() {
        // 初始化
        var result = false;
        // 同步处理
        $.ajaxSetup({async: false});
        // 逻辑
        $.get('/admin/index.php?app=stat_goodsdata&act=getbrandsandgoods', function (response) {
            result = response;
        });
        // 返回
        return result;
    }

    // 点击事件
    $('#view').click(function () {
        // 拼接成数组
        var statics = JSON.parse(getbrandsandgoods());
        // 遍历
        var html = '';
        for (let i = 0; i < statics.length; i++) {
            html += "<p style='height:30px;line-height: 30px;'><span style='float: left;'>" + statics[i].name + "</span><span style='float: right;'>" + statics[i].value + "</span></p>";
        }
        // layer窗口
        layer.open({
            type: 1,
            title: '品牌数据',
            area: ['600px', '360px'],
            shadeClose: true, //点击遮罩关闭
            content: "<div style='padding:20px;'>" + html + "</div>"
        });
    });

</script>
